package polymorphism;

public class PolymorphismTest {
    public static void main(String[] args) {
        Person p = new Person("p", 16);
        Student s = new Student("s", 17, "software technology");
        Teacher t = new Teacher("t", 28, "software engineer");
        
        // 父类表示的范围大
        System.out.println(p);
        p = s;
        System.out.println(p);
        p = t;
        System.out.println(p);
        
        // t = s;
        // s = t;
    }
}
